<div class="table_browse_header"><b>Categories</b><br></div>
<table width="100%">
    <tbody>
	<tr>
	    <th class="table_browse_field_header" width="5%">ID</th>
	    <th class="table_browse_field_header" width="5%">Published</th>
	    <th class="table_browse_field_header" width="15%">Name</th>
	    <th class="table_browse_field_header" width="55%">Description</th>
	    <th class="table_browse_field_header" width="10%">Total articles</th>
	    <th class="table_browse_field_header" width="10%">&nbsp;</th>
	</tr>
	<% 
	    id = 0
	    for category in @categories 
	    id += 1
	%>
	<tr>
	    <td class="table_browse_rows_2" align="center"><%= id %></td>
	    <td class="table_browse_rows_2" align="center">
	    <% if category.publish %>
		<font color="green"><b>YES</b></font>
	    <% else %>
		<font color="red"><b>NO</b></font>
	    <% end %>
	    </td>
	    <td class="table_browse_rows_2" align="left"><%= category.name%></td>
	    <td class="table_browse_rows_2" align="left"><%= category.description%></td>
	    <td class="table_browse_rows_2" align="center"><%= category.articles.count%></td>
	    <td class="table_browse_rows_2" valign="center">
		<%= link_to 'Edit', {:action => 'edit_category', :id=> category}%>&nbsp;|&nbsp;<%= link_to 'Destroy', {:action => 'destroy_category', :id=> category}, :confirm => "Are you sure?"%>
	    </td>
	</tr>
	<% end %>
    </tbody>
</table><br>
<div class="table_browse_controls"><center>&nbsp;&nbsp;&nbsp; <%= @categories.length*@category_pages.length %> categories found. &nbsp;&nbsp;
    <% if @category_pages.length > 1 %>
	Pages: <%= pagination_links(@category_pages)%>
    <%end%>&nbsp;&nbsp;&nbsp;</center></div>